<%-- 
    Document   : suacauhoi
    Created on : Sep 16, 2012, 1:49:29 AM
    Author     : Odotube
--%>

<%@page import="thitracnghiem.CauHoi"%>
<%@page import="thitracnghiem.GiaoVien"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%

            session = request.getSession();
            
            CauHoi ch = (CauHoi) session.getAttribute("cauhoicansua");
            GiaoVien gv = (GiaoVien) session.getAttribute("gv");
            if (gv == null || ch==null) {
                response.sendError(403);
                return;
                
            }
            String s1 = request.getParameter("tb");
                if (s1 == null) {
                    s1 = "";
                }
            out.println(s1);
        %>
        <form action="/ThiTracNghiem/XuLy" method="post">
            <input type="hidden" name="yc" value="quanlycauhoi">
            Cau hoi:<br>
            <textarea name="cauhoidasua"><%=ch.getCauHoi()%></textarea><br>
            Tra loi:<br>
            <textarea name="cautraloidasua"><%
                String s="";
                for(int i=0;i<ch.getMTuyChon().size();i++){
                    s+=ch.getMTuyChon().get(i).getLuaChon()+"//";
                }
                %><%=s%></textarea><br>
            <input type="text" name="dapandasua" value="<%=String.valueOf(ch.getDapAnInt())%>">
            <input type="submit" name="hoantatsuacauhoi" value="Sua">
            <input type="submit" name="hoantatsuacauhoi" value="Thoat">
        </form>
       
    </body>
</html>
